package com.example.basic.web.model.user;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.example.basic.base.IdEntity;
import com.example.basic.base.event.PreCreateEventEntity;
import com.example.basic.base.event.PreUpdateEventEntity;
import com.example.basic.utils.CommonConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * <p>
 * 人员管理
 * </p>
 *
 * @author wjq
 * @since 2024-03-02
 */
@Data
@TableName("sys_user")
@ApiModel(value="User对象", description="人员管理")
public class User extends IdEntity implements PreCreateEventEntity, PreUpdateEventEntity {


    @ApiModelProperty(value = "数据id")
    @TableId("id")
    private String id;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(value = "create_at", fill = FieldFill.INSERT)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date createAt;

    @ApiModelProperty(value = "数据创建人")
    @TableField("create_by")
    private String createBy;

    @ApiModelProperty(value = "数据修改时间")
    @TableField(value = "update_at", fill = FieldFill.UPDATE)
    @JSONField(format = CommonConstant.TIME_FORMAT_EIGHTEEN)
    private Date updateAt;

    @ApiModelProperty(value = "数据修改人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "用户编码")
    @TableField("user_code")
    private String userCode;

    @ApiModelProperty(value = "用户名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "登录名")
    @TableField("login_name")
    private String loginName;

    @ApiModelProperty(value = "登录密码")
    @TableField("login_pwd")
    private String loginPwd;

    @ApiModelProperty(value = "身份证号")
    @TableField("id_no")
    private String idNo;

    @ApiModelProperty(value = "年龄")
    @TableField("age")
    private String age;

    @ApiModelProperty(value = "性别")
    @TableField("sex_code")
    private String sexCode;

    @ApiModelProperty(value = "性别")
    @TableField(exist = false)
    private String sex;

    @ApiModelProperty(value = "联系方式")
    @TableField("phone")
    private String phone;

    @ApiModelProperty(value = "用户类型")
    @TableField("user_class")
    private String userClass;

    @ApiModelProperty(value = "用户类型名称")
    @TableField(exist = false)
    private String userClassName;

    @ApiModelProperty(value = "角色编码")
    @TableField("role_code")
    private String roleCode;

    @ApiModelProperty(value = "角色名称")
    @TableField(exist = false)
    private String roleName;

    @ApiModelProperty(value = "所属部门")
    @TableField("belong_dept")
    private String belongDept;

    @ApiModelProperty(value = "所属部门名称")
    @TableField(exist = false)
    private String belongDeptName;

    @ApiModelProperty(value = "负责部门")
    @TableField("responsible_dept")
    private String responsibleDept;

    @ApiModelProperty(value = "负责部门名称")
    @TableField(exist = false)
    private String responsibleDeptName;

    @ApiModelProperty(value = "锁定（1锁定0未锁定）")
    @TableField("lock_flag")
    private String lockFlag;

    @ApiModelProperty(value = "锁定")
    @TableField(exist = false)
    private String lockFlagName;

    @ApiModelProperty(value = "启用状态1启用 0停用")
    @TableField("enable_flag")
    private String enableFlag;

    @ApiModelProperty(value = "删除1删除0未删除")
    @TableField("delete_flag")
    @TableLogic
    private String deleteFlag;

    @ApiModelProperty(value = "拼音码")
    @TableField("py_code")
    private String pyCode;

    @ApiModelProperty(value = "五笔码")
    @TableField("wb_code")
    private String wbCode;

    @ApiModelProperty(value = "头像")
    @TableField("avatar")
    private String avatar;


}